package com.excel.dao;

import com.excel.bean.Product;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductDao extends JpaRepository<Product,Integer> , JpaSpecificationExecutor<Product> {

    Page<Product> findAll (Pageable pageable);
    @Modifying
    @Query(value = "select * from product ",nativeQuery = true)
    List<Product> add();



}
